<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      //  分析下列代码打印结果
      let num = 1
      console.log(num) //?1
      function fn(a) {
        console.log(num) //?3
        num = 2
        console.log(num) //?2
      }
      num = 3
      console.log(num) //?3
      fn(num)
      console.log(num) //?2
    </script>
  </body>
</html>
